
/*
 * appletTestPanel.java
 *
 * Created on 2010-05-09, 15:38:08
 */

package JET;

import JET.Centers.ControlCenter;
import JET.Centers.Graphics.GUICenter.UtilTabs;
import JET.SA.SA_Menu;
import JET.SA.SA_Selection;
import JET.SA.SA_SpringBody;
import JET.geom.Vec2d;
import JET.graphics.GraphicPanel;
import JET.mygui.MultiSplitPane;
import JET.mygui.MyGuiHelper;
import JET.mygui.MyGuiManager;
import JET.mygui.UtilTabsPane;
import JET.physics.bodies.RigidBody;
import JET.physics.bodies.SpringBody;
import JET.physics.engine.JETEngine;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.KeyEvent;
import javax.swing.JPanel;

/**
 *
 * @author 057Ry
 */
public class appletTestPanel extends javax.swing.JPanel /*implements GraphicPanelContainer*/ {

    static final ControlCenter CC = ControlCenter.getInstance();
    GraphicPanel graphicPanel;
    private Animator animator;
    private MultiSplitPane msp;

    /** Creates new form appletTestPanel */
    public appletTestPanel() {
        initComponents();
        
        MyGuiManager.getInstance().setRootContainer(guiRootPanel);

//        // Create GUI hierarchy by hand ...
//        msp = new MultiSplitPane(1, true);
//        CenterTabsPane ctp = new CenterTabsPane("This is the one!");
//        ctp.add(CC.GUIC.getGraphicPanelContainer());
//        msp.setCellComponent(0, ctp, true);
//        guiRootPanel.add(msp, BorderLayout.CENTER);
//        initUtils();

        // Create GUI hierarchy by saved xml state ...
        msp = CC.GUIC.builGuiSctructure(this.getClass().getResourceAsStream("/JET/gui.xml"), CC);
        guiRootPanel.add(msp, BorderLayout.CENTER);
    }
    
    public void initUtils() {
        MultiSplitPane mspV = new MultiSplitPane(3, false);

            UtilTabsPane utp = new UtilTabsPane("Util Tabs Pane");
            utp.add( (Component) CC.GUIC.getUtilTab(UtilTabs.Tools));
        mspV.setCellComponent(0, utp, true);

            utp = new UtilTabsPane("Util Tabs Pane");
            utp.add( (Component) CC.GUIC.getUtilTab(UtilTabs.Bodies));
        mspV.setCellComponent(1, utp, true);

            utp = new UtilTabsPane("Util Tabs Pane");
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.Mass)));
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.Spring)));
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.RSpring)));
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.ToolsOptions)));
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.SpringBody)));
            utp.add( MyGuiHelper.getNewJScrollPane( (Component) CC.GUIC.getUtilTab(UtilTabs.Torque)));
            utp.add( (Component) CC.GUIC.getUtilTab(UtilTabs.Scripts));
            utp.add( (Component) CC.GUIC.getUtilTab(UtilTabs.Output));
            utp.add( (Component) CC.GUIC.getUtilTab(UtilTabs.SceneInspector));

        mspV.setCellComponent(2, utp, true);

        msp.insert(mspV, false, 0, 150);
    }

    private void initComponents(){}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    /*
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        guiRootPanel = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        animatiorPanel = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        toggleButtonDrawForces = new javax.swing.JToggleButton();
        toggleButtonDrawVelocities = new javax.swing.JToggleButton();
        newProjectButton = new javax.swing.JButton();
        openProjectButton = new javax.swing.JButton();
        startButton = new javax.swing.JButton();
        saveProjectButton = new javax.swing.JButton();
        stopButton = new javax.swing.JButton();
        refreshButton = new javax.swing.JButton();
        toggleButtonFollowCamera = new javax.swing.JToggleButton();
        gravityTextField = new javax.swing.JTextField();
        recordButton = new javax.swing.JToggleButton();
        sliderTimeStep = new javax.swing.JSlider();
        textFieldTimeStep = new javax.swing.JTextField();
        jToggleButton1 = new javax.swing.JToggleButton();
        jToggleButton2 = new javax.swing.JToggleButton();
        jPanel3 = new javax.swing.JPanel();
        jToggleButton3 = new javax.swing.JToggleButton();
        jToggleButton4 = new javax.swing.JToggleButton();
        jButton7 = new javax.swing.JButton();
        jToggleButton5 = new javax.swing.JToggleButton();
        jButton1 = new javax.swing.JButton();
        toggleButtonDrawActionFrame = new javax.swing.JToggleButton();
        jToggleButton6 = new javax.swing.JToggleButton();
        jButton6 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        jToggleButton7 = new javax.swing.JToggleButton();

        guiRootPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        guiRootPanel.setLayout(new java.awt.BorderLayout());

        animatiorPanel.setAlignmentX(0.0F);
        animatiorPanel.setAlignmentY(0.0F);
        animatiorPanel.setFocusable(false);
        animatiorPanel.setOpaque(false);
        animatiorPanel.setPreferredSize(new java.awt.Dimension(1155, 30));

        jPanel2.setAlignmentX(0.0F);
        jPanel2.setAlignmentY(0.0F);
        jPanel2.setOpaque(false);
        jPanel2.setPreferredSize(new java.awt.Dimension(727, 28));

        toggleButtonDrawForces.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/force.PNG"))); // NOI18N
        toggleButtonDrawForces.setSelected(CC.getActualScene().GC.isDrawMass2dForces());
        toggleButtonDrawForces.setToolTipText("draw forces");
        toggleButtonDrawForces.setAlignmentY(0.0F);
        toggleButtonDrawForces.setFocusable(false);
        toggleButtonDrawForces.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleButtonDrawForces.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleButtonDrawForcesActionPerformed(evt);
            }
        });

        toggleButtonDrawVelocities.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/velocity.PNG"))); // NOI18N
        toggleButtonDrawVelocities.setSelected(CC.getActualScene().GC.isDrawMass2dVelocities());
        toggleButtonDrawVelocities.setToolTipText("draw velocities");
        toggleButtonDrawVelocities.setAlignmentY(0.0F);
        toggleButtonDrawVelocities.setFocusable(false);
        toggleButtonDrawVelocities.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleButtonDrawVelocities.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleButtonDrawVelocitiesActionPerformed(evt);
            }
        });

        newProjectButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/New Project 22x22.png"))); // NOI18N
        newProjectButton.setToolTipText("New Project");
        newProjectButton.setAlignmentY(0.0F);
        newProjectButton.setFocusable(false);
        newProjectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        newProjectButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newProjectButtonActionPerformed(evt);
            }
        });

        openProjectButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Open Project 22x22.png"))); // NOI18N
        openProjectButton.setToolTipText("Open project (Ctrl+O)");
        openProjectButton.setAlignmentY(0.0F);
        openProjectButton.setEnabled(false);
        openProjectButton.setFocusable(false);
        openProjectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        openProjectButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                openProjectButtonActionPerformed(evt);
            }
        });

        startButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/start_animation.PNG"))); // NOI18N
        startButton.setToolTipText("start simulation");
        startButton.setAlignmentY(0.0F);
        startButton.setFocusable(false);
        startButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        startButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startButtonActionPerformed(evt);
            }
        });

        saveProjectButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Save Project 22x22.png"))); // NOI18N
        saveProjectButton.setToolTipText("Save Project (Ctrl+S)");
        saveProjectButton.setAlignmentY(0.0F);
        saveProjectButton.setEnabled(false);
        saveProjectButton.setFocusable(false);
        saveProjectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        saveProjectButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveProjectButtonActionPerformed(evt);
            }
        });

        stopButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/stop_animation.PNG"))); // NOI18N
        stopButton.setToolTipText("stop simulation");
        stopButton.setAlignmentY(0.0F);
        stopButton.setEnabled(false);
        stopButton.setFocusable(false);
        stopButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        stopButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                stopButtonActionPerformed(evt);
            }
        });

        refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Refresh 22x22.png"))); // NOI18N
        refreshButton.setToolTipText("Refresh Project");
        refreshButton.setAlignmentY(0.0F);
        refreshButton.setEnabled(false);
        refreshButton.setFocusable(false);
        refreshButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        refreshButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                refreshButtonActionPerformed(evt);
            }
        });

        toggleButtonFollowCamera.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/follow_camera.PNG"))); // NOI18N
        toggleButtonFollowCamera.setSelected(CC.getActualScene().EC.isFollowCamera());
        toggleButtonFollowCamera.setToolTipText("turn follow camera ON/OFF");
        toggleButtonFollowCamera.setAlignmentY(0.0F);
        toggleButtonFollowCamera.setFocusable(false);
        toggleButtonFollowCamera.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleButtonFollowCamera.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleButtonFollowCameraActionPerformed(evt);
            }
        });

        gravityTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        gravityTextField.setText(CC.getCurrentScene()!=null?""+CC.getCurrentScene().getEngine().gravity:"");
        gravityTextField.setAlignmentX(0.0F);
        gravityTextField.setAlignmentY(0.0F);
        gravityTextField.setAutoscrolls(false);
        gravityTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gravityTextFieldActionPerformed(evt);
            }
        });

        recordButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/record.PNG"))); // NOI18N
        recordButton.setSelected(CC.isRecord());
        recordButton.setToolTipText("record");
        recordButton.setAlignmentY(0.0F);
        recordButton.setEnabled(false);
        recordButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        recordButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                recordButtonActionPerformed(evt);
            }
        });

        sliderTimeStep.setMaximum(20);
        sliderTimeStep.setToolTipText("simulation time step");
        sliderTimeStep.setValue(8);
        sliderTimeStep.setAlignmentX(0.0F);
        sliderTimeStep.setAlignmentY(0.0F);
        sliderTimeStep.setFocusable(false);
        sliderTimeStep.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderTimeStepStateChanged(evt);
            }
        });

        textFieldTimeStep.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        textFieldTimeStep.setText("0.08");
        textFieldTimeStep.setAlignmentX(0.0F);
        textFieldTimeStep.setAlignmentY(0.0F);
        textFieldTimeStep.setAutoscrolls(false);
        textFieldTimeStep.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                textFieldTimeStepKeyPressed(evt);
            }
        });

        jToggleButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/gravity.PNG"))); // NOI18N
        jToggleButton1.setToolTipText("gravity");
        jToggleButton1.setAlignmentY(0.0F);
        jToggleButton1.setFocusable(false);
        jToggleButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton1ActionPerformed(evt);
            }
        });

        jToggleButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/damping.PNG"))); // NOI18N
        jToggleButton2.setToolTipText("damping");
        jToggleButton2.setAlignmentY(0.0F);
        jToggleButton2.setFocusable(false);
        jToggleButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(newProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(openProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(saveProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30)
                .addComponent(startButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(stopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(recordButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(sliderTimeStep, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textFieldTimeStep, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(40, 40, 40)
                .addComponent(jToggleButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(gravityTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jToggleButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toggleButtonDrawVelocities, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toggleButtonDrawForces, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toggleButtonFollowCamera, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(toggleButtonFollowCamera, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(toggleButtonDrawForces, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(toggleButtonDrawVelocities, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(gravityTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(textFieldTimeStep, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(sliderTimeStep, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(recordButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(stopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(startButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(saveProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(openProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(newProjectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        animatiorPanel.add(jPanel2);

        jPanel3.setAlignmentX(0.0F);
        jPanel3.setPreferredSize(new java.awt.Dimension(431, 28));

        jToggleButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/main_grid.PNG"))); // NOI18N
        jToggleButton3.setSelected(CC.getActualScene().GC.isDrawMainGrid());
        jToggleButton3.setToolTipText("main grid");
        jToggleButton3.setFocusable(false);
        jToggleButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton3ActionPerformed(evt);
            }
        });

        jToggleButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/help_grid.PNG"))); // NOI18N
        jToggleButton4.setSelected(CC.getActualScene().GC.isDrawHelpGrid());
        jToggleButton4.setToolTipText("help grid");
        jToggleButton4.setFocusable(false);
        jToggleButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton4ActionPerformed(evt);
            }
        });

        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/red_cross.PNG"))); // NOI18N
        jButton7.setToolTipText("delete actual spring body");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        jToggleButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/collision_detection.PNG"))); // NOI18N
        jToggleButton5.setSelected(true);
        jToggleButton5.setToolTipText("collision detection");
        jToggleButton5.setFocusable(false);
        jToggleButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton5ActionPerformed(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/clear_scene.PNG"))); // NOI18N
        jButton1.setToolTipText("clear scene");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        toggleButtonDrawActionFrame.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/action_frame.PNG"))); // NOI18N
        toggleButtonDrawActionFrame.setSelected(CC.getActualScene().GC.isDrawActionFrame());
        toggleButtonDrawActionFrame.setToolTipText("draw action frame aroud actual spring body");
        toggleButtonDrawActionFrame.setFocusable(false);
        toggleButtonDrawActionFrame.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toggleButtonDrawActionFrame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                toggleButtonDrawActionFrameActionPerformed(evt);
            }
        });

        jToggleButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/collision_answer.PNG"))); // NOI18N
        jToggleButton6.setSelected(true);
        jToggleButton6.setToolTipText("answering collisions");
        jToggleButton6.setFocusable(false);
        jToggleButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton6ActionPerformed(evt);
            }
        });

        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/green_plus.PNG"))); // NOI18N
        jButton6.setToolTipText("new spring body");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/zero_velocities.PNG"))); // NOI18N
        jButton2.setToolTipText("zero mass velocity");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/random_velocities.PNG"))); // NOI18N
        jButton3.setToolTipText("random velocities");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton8.setToolTipText("this is test button - dont uese it :P");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jToggleButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/main_grid.PNG"))); // NOI18N
        jToggleButton7.setSelected(CC.getActualScene().GC.isDrawMainGrid());
        jToggleButton7.setToolTipText("main grid");
        jToggleButton7.setFocusable(false);
        jToggleButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jToggleButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jToggleButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jToggleButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jToggleButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(toggleButtonDrawActionFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addComponent(jToggleButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jToggleButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36)
                .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(toggleButtonDrawActionFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jToggleButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        animatiorPanel.add(jPanel3);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1189, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(animatiorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 1169, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 45, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(4, 4, 4)
                    .addComponent(animatiorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(guiRootPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 1189, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(guiRootPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 499, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
*/
    private void toggleButtonDrawForcesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleButtonDrawForcesActionPerformed
        CC.getCurrentScene().GC.setDrawMass2dForces(toggleButtonDrawForces.isSelected());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_toggleButtonDrawForcesActionPerformed

    private void toggleButtonDrawVelocitiesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleButtonDrawVelocitiesActionPerformed
        CC.getCurrentScene().GC.setDrawMass2dVelocities(toggleButtonDrawVelocities.isSelected());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_toggleButtonDrawVelocitiesActionPerformed

    private void newProjectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newProjectButtonActionPerformed
        //SA_Menu.newProject(CC);
}//GEN-LAST:event_newProjectButtonActionPerformed

    private void openProjectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openProjectButtonActionPerformed
        //openProject();
}//GEN-LAST:event_openProjectButtonActionPerformed

    private void startButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startButtonActionPerformed
        System.out.println(" wcisnieto start, CC=" + CC);
        startAnimation();
}//GEN-LAST:event_startButtonActionPerformed

    private void saveProjectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveProjectButtonActionPerformed
        //saveProject();
}//GEN-LAST:event_saveProjectButtonActionPerformed

    private void stopButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stopButtonActionPerformed
        stopAnimation();
}//GEN-LAST:event_stopButtonActionPerformed

    private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshButtonActionPerformed
        refreshProject();
}//GEN-LAST:event_refreshButtonActionPerformed

    private void toggleButtonFollowCameraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleButtonFollowCameraActionPerformed
        CC.getCurrentScene().EC.setFollowCamera( toggleButtonFollowCamera.isSelected() );
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_toggleButtonFollowCameraActionPerformed

    private void gravityTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gravityTextFieldActionPerformed
        double g = Double.parseDouble(gravityTextField.getText());
        Scene s = CC.getCurrentScene();
        if (s!=null) {
            s.getJETContext().gravity = g;
            gravityTextField.setText(""+g);
        } else
            gravityTextField.setText("");
}//GEN-LAST:event_gravityTextFieldActionPerformed

    private void recordButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_recordButtonActionPerformed
        CC.setRecord(recordButton.isSelected());
}//GEN-LAST:event_recordButtonActionPerformed

    private void sliderTimeStepStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderTimeStepStateChanged
        double dTime = sliderTimeStep.getValue() / 100.0;
        CC.getCurrentScene().getJETContext().setDTime(dTime);
        textFieldTimeStep.setText("" + dTime);
}//GEN-LAST:event_sliderTimeStepStateChanged

    private void textFieldTimeStepKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldTimeStepKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            double dTime = sliderTimeStep.getValue() / 100.0;

            try {
                dTime = Double.parseDouble(textFieldTimeStep.getText());
            } catch (Exception e) {
                // Reset old value
                CC.getCurrentScene().getJETContext().setDTime(dTime);
                textFieldTimeStep.setText("" + dTime);
                sliderTimeStep.setValue((int) (dTime * 100));

                // Print exception info
                System.out.println("textFieldTimeStepKeyPressed -> zły format danych");
                e.printStackTrace();
            }

            // If everything went right - set new time step
            CC.getCurrentScene().getJETContext().setDTime(dTime);
            textFieldTimeStep.setText("" + dTime);
            if (dTime >= 1. / 100.) {
                sliderTimeStep.setValue((int) (dTime * 100));
            } else {
                sliderTimeStep.setValue(1);
                CC.getCurrentScene().getJETContext().setDTime(dTime);
                textFieldTimeStep.setText("" + dTime);
            }

        }
}//GEN-LAST:event_textFieldTimeStepKeyPressed

    private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed
        CC.getCurrentScene().getJETContext().setApplyGravity(!CC.getCurrentScene().getJETContext().isApplyGravity());
        System.out.println("action performed ag= " + CC.getCurrentScene().getJETContext().isApplyGravity());
}//GEN-LAST:event_jToggleButton1ActionPerformed

    private void jToggleButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton2ActionPerformed
        CC.getCurrentScene().getJETContext().setApplyDamping(!CC.getCurrentScene().getJETContext().isApplyDamping());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_jToggleButton2ActionPerformed

    private void jToggleButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton3ActionPerformed
        if (CC != null && CC.getCurrentScene().GC.getGraphicPanel() != null) {
            CC.getCurrentScene().GC.setDrawMainGrid(!CC.getCurrentScene().GC.isDrawMainGrid());
            CC.GUIC.repaintAllSceneTabs();
            System.out.println("main grid draw = " + CC.getCurrentScene().GC.isDrawMainGrid());
        }
}//GEN-LAST:event_jToggleButton3ActionPerformed

    private void jToggleButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton4ActionPerformed
        if (CC != null && CC.getCurrentScene().GC.getGraphicPanel() != null) {
            CC.getCurrentScene().GC.setDrawHelpGrid(!CC.getCurrentScene().GC.isDrawHelpGrid());
            CC.GUIC.repaintAllSceneTabs();
            System.out.println("help grid draw = " + CC.getCurrentScene().GC.isDrawHelpGrid());
        }
}//GEN-LAST:event_jToggleButton4ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        if (CC.getCurrentScene().EC.currentBody instanceof SpringBody) {
            SA_SpringBody.removeSpringBody((SpringBody)CC.getCurrentScene().EC.currentBody, CC.getCurrentScene());
            CC.GUIC.repaintAllSceneTabs();
        }
}//GEN-LAST:event_jButton7ActionPerformed

    private void jToggleButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton5ActionPerformed
        CC.getCurrentScene().getJETContext().setFindCollisions(!CC.getCurrentScene().getJETContext().isFindCollisions());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_jToggleButton5ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        clearScene();
}//GEN-LAST:event_jButton1ActionPerformed

    private void toggleButtonDrawActionFrameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_toggleButtonDrawActionFrameActionPerformed
        CC.getCurrentScene().GC.setDrawActionFrame(toggleButtonDrawActionFrame.isSelected());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_toggleButtonDrawActionFrameActionPerformed

    private void jToggleButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton6ActionPerformed
        CC.getCurrentScene().getJETContext().setResolveCollisions(!CC.getCurrentScene().getJETContext().isResolveCollisions());
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_jToggleButton6ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        SA_SpringBody.addSpringBodyToScene(CC.getCurrentScene(), true);
}//GEN-LAST:event_jButton6ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        zeroVelocities();
}//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        randomVelocities();
}//GEN-LAST:event_jButton3ActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        if (CC.getCurrentScene().EC.currentBody instanceof SpringBody) {
            SpringBody sb = (SpringBody) CC.getCurrentScene().EC.currentBody;

            RigidBody rb = new RigidBody();
            rb.buildBaseShape(sb.getMassList());
            rb.applyForce(new Vec2d(1.,0.), sb.getMassList().get(0).getPosition());
            CC.getCurrentScene().getJETContext().rigidBodyList.add(rb);
        }
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jToggleButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton7ActionPerformed
    }//GEN-LAST:event_jToggleButton7ActionPerformed

    public void startAnimation() {
        CC.play(CC.GUIC.getCurrentSceneName());
    }

    public void stopAnimation() {
        //animator.stop();
        animator.interrupt();
        startButton.setEnabled(true);
        stopButton.setEnabled(false);
        CC.animationInProgress = false;
    }
    public void clearScene()
    {
        SA_Menu.clearScene(CC.getCurrentScene());
        CC.getCurrentScene().EC.selectionGroup.clear();
        CC.GUIC.repaintAllSceneTabs();
    }

    public void zeroVelocities()
    {
        if (CC.getCurrentScene().EC.selectionGroup.isEmpty()) {
            JETEngine.zeroMass2dVelocities(CC.getCurrentScene().getJETContext());
        } else {
            SA_Selection.zeroSelectedMassVelocities(CC.getCurrentScene());
        }
        CC.GUIC.repaintAllSceneTabs();
    }

    public void randomVelocities()
    {
        if (CC.getCurrentScene().EC.selectionGroup.isEmpty()) {
            JETEngine.randomMass2dVelocities(CC.getCurrentScene().getJETContext());
        } else {
            SA_Selection.randomSelectedMassVelocities(CC.getCurrentScene());
        }
        CC.GUIC.repaintAllSceneTabs();
    }
    

    private void refreshProject()
    {
        try {
            if (!CC.getProjectFile().equals(""))
                CC.loadProjectFile2(CC.getProjectFile());
            else
                System.out.println("Cannot refresh project, as projectFile string is emty!");
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public JPanel getPanel() {
        return guiRootPanel;
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel animatiorPanel;
    private javax.swing.JTextField gravityTextField;
    private javax.swing.JPanel guiRootPanel;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JToggleButton jToggleButton2;
    private javax.swing.JToggleButton jToggleButton3;
    private javax.swing.JToggleButton jToggleButton4;
    private javax.swing.JToggleButton jToggleButton5;
    private javax.swing.JToggleButton jToggleButton6;
    private javax.swing.JToggleButton jToggleButton7;
    private javax.swing.JButton newProjectButton;
    private javax.swing.JButton openProjectButton;
    private javax.swing.JToggleButton recordButton;
    private javax.swing.JButton refreshButton;
    private javax.swing.JButton saveProjectButton;
    private javax.swing.JSlider sliderTimeStep;
    private javax.swing.JButton startButton;
    private javax.swing.JButton stopButton;
    private javax.swing.JTextField textFieldTimeStep;
    private javax.swing.JToggleButton toggleButtonDrawActionFrame;
    private javax.swing.JToggleButton toggleButtonDrawForces;
    private javax.swing.JToggleButton toggleButtonDrawVelocities;
    private javax.swing.JToggleButton toggleButtonFollowCamera;
    // End of variables declaration//GEN-END:variables

    public JPanel getGraphicPanelContainer() {
        return guiRootPanel;
    }
}
